package com.unione.unione_protocol.yx_robot_auto

import com.google.gson.Gson
import com.unione.unione_protocol.yx_robot_auto.bean.AGVControlRequest

object AGVRobotProtocol {


    fun controlAGV(
        controlSpeed: Double,
        controlAngle: Double,
        time: String,
        isCheckcollision: Boolean = true
    ): String {
        return Gson().toJson(AGVControlRequest().apply {
            speed = controlSpeed
            angle = controlAngle
            agvlocaltime = time
            collision = isCheckcollision
        }) + "\\r\\n\\r\\n"
    }
}